// standard libraries
#include <string>
#include <cstdio>

// custom libraries
#include "..\..\include\file\filebase.h"
#include "..\..\include\file\outfile.h" // matching header


// ==================================
//    CONSTRUCTORS and DESTRUCTORS
// ==================================

OutFile::OutFile() 
{
	// Nothing
}

OutFile::OutFile(std::string path, FileBase::OpenMode openMode) 
{
    open(path, openMode);
}


// ==================================
//            FUNCTIONS
// ==================================

void OutFile::open(std::string path, FileBase::OpenMode openMode)
{
	// Open file in write mode.
	FileBase::open_as(path, openMode);
}

void OutFile::puts(const char* line)
{
	fprintf(FileBase::file_, line);
}